var status = -1;
var selectionLog = [];

function action(mode, type, selection) {
    var reactor = "action" + cm.getMapId();
    eval(reactor)(mode, type, selection)
}

function action330006900(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(2700023, 1, 1870, -244, 100);
            cm.spawnMobLimit(2700023, 1, 1662, -244, 100);
            cm.spawnMobLimit(2700023, 1, 726, -4, 100);
            cm.spawnMobLimit(2700023, 1, 271, -4, 100);
            cm.spawnMobLimit(2700023, 1, -43, -4, 100);
            cm.spawnMobLimit(2700024, 1, 1780, -25, 100);
            cm.spawnMobLimit(2700024, 1, 1271, -25, 100);
            cm.spawnMobLimit(2700024, 1, 845, -4, 100);
            cm.spawnMobLimit(2700024, 1, 256, -4, 100);
            cm.spawnMobLimit(2700024, 1, 65, -4, 100);
            cm.spawnMobLimit(2700023, 1, 1156, -25, 100);
            cm.spawnMobLimit(2700020, 1, 1025, -25, 100);
            cm.spawnMobLimit(2700022, 1, 817, -56, 100);
            cm.spawnMobLimit(2700022, 1, 638, -52, 100);
            cm.spawnMobLimit(2700022, 1, 451, -35, 100);
            cm.spawnMobLimit(2700021, 1, 305, -4, 100);
            cm.spawnMobLimit(2700020, 1, 160, -4, 100);
            cm.spawnMobLimit(2700024, 1, 1828, -244, 100);
            cm.spawnMobLimit(2700024, 1, 1587, -244, 100);
            cm.spawnMobLimit(2700023, 1, 1349, -244, 100);
            cm.spawnMobLimit(2700022, 1, 1769, -42, 100);
            cm.spawnMobLimit(2700021, 1, 1475, -25, 100);
            cm.spawnMobLimit(2700020, 1, 1264, -25, 100);
            cm.playerMessage(-1, "只有消灭该区域的所有怪物之后, 才能移动到下一区域. ");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/stage");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/number/1");
            cm.dispose()
        }
    }
}

function action330007000(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(2700021, 1, 1609, -364, 100);
            cm.spawnMobLimit(2700024, 1, 1415, -4, 100);
            cm.spawnMobLimit(2700024, 1, 1276, -4, 100);
            cm.spawnMobLimit(2700024, 1, 881, -4, 100);
            cm.spawnMobLimit(2700024, 1, 1361, -244, 100);
            cm.spawnMobLimit(2700024, 1, 1091, -244, 100);
            cm.spawnMobLimit(2700023, 1, 750, -244, 100);
            cm.spawnMobLimit(2700023, 1, 657, -4, 100);
            cm.spawnMobLimit(2700023, 1, 361, -4, 100);
            cm.spawnMobLimit(2700023, 1, 1163, -244, 100);
            cm.spawnMobLimit(2700020, 1, 769, -244, 100);
            cm.spawnMobLimit(2700023, 1, 1707, -4, 100);
            cm.spawnMobLimit(2700021, 1, 1462, -4, 100);
            cm.spawnMobLimit(2700020, 1, 1300, -4, 100);
            cm.spawnMobLimit(2700024, 1, 1156, -4, 100);
            cm.spawnMobLimit(2700023, 1, 865, -4, 100);
            cm.spawnMobLimit(2700023, 1, 1005, -4, 100);
            cm.spawnMobLimit(2700022, 1, 725, -75, 100);
            cm.spawnMobLimit(2700021, 1, 468, -4, 100);
            cm.spawnMobLimit(2700020, 1, 310, -4, 100);
            cm.spawnMobLimit(2700023, 1, 1654, -364, 100);
            cm.spawnMobLimit(2700022, 1, 1313, -263, 100);
            cm.spawnMobLimit(2700021, 1, 1018, -244, 100);
            cm.spawnMobLimit(2700020, 1, 655, -244, 100);
            cm.playerMessage(-1, "只有消灭该区域的所有怪物之后, 才能移动到下一区域. ");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/stage");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/number/2");
            cm.dispose()
        }
    }
}

function action330007100(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(2700023, 1, 452, -4, 100);
            cm.spawnMobLimit(2700024, 1, 1722, -124, 100);
            cm.spawnMobLimit(2700024, 1, 1345, -124, 100);
            cm.spawnMobLimit(2700024, 1, 1021, -64, 100);
            cm.spawnMobLimit(2700024, 1, 511, -4, 100);
            cm.spawnMobLimit(2700024, 1, 315, -4, 100);
            cm.spawnMobLimit(2700023, 1, 49, -4, 100);
            cm.spawnMobLimit(2700023, 1, 1587, -124, 100);
            cm.spawnMobLimit(2700020, 1, 1472, -124, 100);
            cm.spawnMobLimit(2700022, 1, 1404, -186, 100);
            cm.spawnMobLimit(2700024, 1, 962, -64, 100);
            cm.spawnMobLimit(2700020, 1, 591, -4, 100);
            cm.spawnMobLimit(2700021, 1, 431, -4, 100);
            cm.spawnMobLimit(2700023, 1, 255, -4, 100);
            cm.spawnMobLimit(2700023, 1, 1682, -124, 100);
            cm.spawnMobLimit(2700022, 1, 1290, -187, 100);
            cm.spawnMobLimit(2700021, 1, 1080, -64, 100);
            cm.spawnMobLimit(2700020, 1, 710, -4, 100);
            cm.playerMessage(-1, "只有消灭该区域的所有怪物之后, 才能移动到下一区域. ");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/final");
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};